import { defineAsyncComponent } from "vue";
import { imageResultFilter } from "./business.js";
export const loginType = {
  accountPwd: 1, //用户名密码
  mailCode: 2, //短信验证码
};
export const clientType = {
  android: 1,
  ios: 2,
  web: 3,
  pc: 4,
};
export const qiankunParentMap = {
  // LAYOUT: defineAsyncComponent(() =>
  //   import("@/components/Layout/layoutIndex.vue")
  // ),
  // CONSOLE_LAYOUT: defineAsyncComponent(() =>
  //   import("@/components/Layout/console/consoleInComp.vue")
  // ),
};
export const qiankunParentMapKeyName = Object.keys(qiankunParentMap).reduce(
  (pre, next) => {
    pre[next] = next;
    return pre;
  },
  {}
);
export function object2Enum(obj) {
    const enumObject = {};
    Object.keys(obj).forEach(key => {
        enumObject[key] = obj[key];
        enumObject[obj[key]] = key;
    });
    return Object.freeze(enumObject);
}
export const drawTypeEnum = object2Enum({
    0: "lines",
    1: "polygons",
});
export const dragTypeEnum = object2Enum({
    0: "point",
    1: "line",
    2: "face",
});

export const childrenList = [
  // {
  //   name: "aiShopChild",
  //   entry: process.env.NODE_ENV === "production" ? "" : "//localhost:16361/",
  //   container: "#childWrapper",
  //   activeRule: "/aiShopChild",
  //   parentCompType: qiankunParentMapKeyName.CONSOLE_LAYOUT,
  // },
];
export const langType = {
  zh_CN: "zh_CN",
  en: "en",
};
export const videoSourceList = [
  {
    label: "网关",
    value: 2,
  },
  {
    label: "行业视频",
    value: 3,
  },
];
export const alarmPushList = [...videoSourceList];
export const alarmModesList = [
  {
    label: "图片告警",
    value: 1,
  },
  {
    label: "电话语音外呼",
    value: 2,
  },
];
export const labelOfResultList = [
  {
    label: "电瓶车",
    value: "electric scooter",
  },
  {
    label: "垃圾",
    value: "garbage",
  },
  {
    label: "地面积水",
    value: "puddle",
  },
  {
    label: "人体",
    value: "body",
  },
  {
    label: "戴头盔",
    value: "helmet",
  },
  {
    label: "未戴头盔",
    value: "nohelmet",
  },
  {
    label: "非机动车违停",
    value: "nonvehicle",
  },
  {
    label: "机动车",
    value: "car",
  },
  {
    label: "未戴口罩",
    value: "NoMask",
  },
  {
    label: "戴口罩",
    value: "Mask",
  },
  {
    label: "厨师服",
    value: "whitecoat",
  },
  {
    label: "厨师帽",
    value: "whitehat",
  },
  {
    label: "玩手机",
    value: "calling",
  },
  {
    label: "吸烟",
    value: "smoking",
  },
  {
    label: "人头",
    value: "head",
  },
  {
    label: "烟雾",
    value: "smog",
  },
  {
    label: "烟火",
    value: "fire",
  },
];
